package com.ruoyi.health.report.service.impl;


import java.util.List;

import com.ruoyi.health.report.domain.HealthSuggestion;
import com.ruoyi.health.report.mapper.HealthSuggestionMapper;
import com.ruoyi.health.report.service.IHealthSuggestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 健康建议Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-25
 */
@Service
public class HealthSuggestionServiceImpl implements IHealthSuggestionService
{
    @Autowired
    private HealthSuggestionMapper healthSuggestionMapper;

    /**
     * 查询健康建议
     *
     * @param id 健康建议ID
     * @return 健康建议
     */
    @Override
    public HealthSuggestion selectHealthSuggestionById(Long id)
    {
        return healthSuggestionMapper.selectHealthSuggestionById(id);
    }

    /**
     * 查询健康建议列表
     *
     * @param healthSuggestion 健康建议
     * @return 健康建议
     */
    @Override
    public List<HealthSuggestion> selectHealthSuggestionList(HealthSuggestion healthSuggestion)
    {
        return healthSuggestionMapper.selectHealthSuggestionList(healthSuggestion);
    }

    /**
     * 新增健康建议
     *
     * @param healthSuggestion 健康建议
     * @return 结果
     */
    @Override
    public int insertHealthSuggestion(HealthSuggestion healthSuggestion)
    {
        return healthSuggestionMapper.insertHealthSuggestion(healthSuggestion);
    }

    /**
     * 修改健康建议
     *
     * @param healthSuggestion 健康建议
     * @return 结果
     */
    @Override
    public int updateHealthSuggestion(HealthSuggestion healthSuggestion)
    {
        return healthSuggestionMapper.updateHealthSuggestion(healthSuggestion);
    }

    /**
     * 批量删除健康建议
     *
     * @param ids 需要删除的健康建议ID
     * @return 结果
     */
    @Override
    public int deleteHealthSuggestionByIds(Long[] ids)
    {
        return healthSuggestionMapper.deleteHealthSuggestionByIds(ids);
    }

    /**
     * 删除健康建议信息
     *
     * @param id 健康建议ID
     * @return 结果
     */
    @Override
    public int deleteHealthSuggestionById(Long id)
    {
        return healthSuggestionMapper.deleteHealthSuggestionById(id);
    }
}
